<script>
import {
  defineComponent,
  reactive,
  toRefs
} from 'vue'

export default defineComponent({
  name: 'ModuleCard',
  props: {
    title: {
      type: String,
      default: '卡片标题'
    }
  },
  setup() {
    const state = reactive({})

    return {
      ...toRefs(state)
    }
  }
})
</script>

<template>
  <div class="component-module-card-container">
    <div class="title-block">{{ title }}</div>
    <div class="slot-body">
      <slot />
    </div>
  </div>
</template>

<style lang="scss">
.component-module-card-container {
  width: 100%;
  .title-block {
    height: 32px;
    color: #ffffff;
    background-color: #74bcff;
    display: flex;
    align-items: center;
    padding-left: 16px;
  }

  .slot-body {
    padding: 12px;
  }
}
</style>
